import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class DataChangeCheck {

    public int beforeCount(WebDriver driver){

        WebElement df = driver.findElement(By.id("list-active-projects-container"));
        String d = df.findElement(By.id("active-projects-count")).getText();
        int foo = Integer.parseInt(d);
        return foo;
    }

    public int afterCount(WebDriver driver) {

        WebElement dff = driver.findElement(By.id("list-active-projects-container"));
        String fd = dff.findElement(By.id("active-projects-count")).getText();
        int fofo = Integer.parseInt(fd);

        return fofo;
    }

    public int checkingActionCountHasIncreased (WebDriver driver) {

        WebElement addedActionCount = driver.findElement(By.id("topbar"));
        String actionCount = addedActionCount.findElement(By.id("badge_count")).getText();
        int fofo = Integer.parseInt(actionCount);

        return fofo;
    }
    public int getContextCount(WebDriver driver) {

        WebElement addedActionCount = driver.findElement(By.id("topbar"));
        String actionCount = addedActionCount.findElement(By.id("badge_count")).getText();
        int fofo = Integer.parseInt(actionCount);

        return fofo;
    }

}
